﻿using System.Web.UI.WebControls;
using System.Web.UI;
using System.ComponentModel;
using SiteUnity.Layers.Application;
using System;
using SiteUnity.Layers.Application.BaseClasses;

namespace SiteUnity.Frame.Modules
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:FooterText runat=server/>")]
    public class FooterText : BaseWebControl
    {
        protected override void RenderContents(HtmlTextWriter output)
        {
            string footerText = string.Format("&copy; {0} {1}. {2}", DateTime.Now.Year, SiteManager.Website.Name, SiteManager.FindWebsiteSettingByKey("Footer-Text").Value);
            output.Write(footerText);
        }
    }
}
